package com.medical.medical.controller;

import com.medical.medical.entity.Department;
import com.medical.medical.service.DepartmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.swing.*;
import java.util.List;

/**
 * @authorDesc
 * @create 2022/9/13 11:02
 * @ClassName PatientController
 * @Author YU
 * @description 使用者进行页面跳转
 */
@Controller
public class UserController {

    /**
     * 跳转到 main.html
     */
    @RequestMapping("/toMyShowing")
    public String toMyShowing(){
        return "wld/main";
    }

    /**
     * 跳转到查询药品页面
     */
    @RequestMapping("togetAllDrug")
    public String togetAllDrug(){
        return "wld/druglist";
    }

    @RequestMapping("test.do")
    public String Test(){
        return "notice";
    }

    /**
     * 跳转到用户个人信息修改页面
     */
    @RequestMapping("/toModifyPateint")
    public String toModifyPateint(int id, Model model){
            model.addAttribute("id",id);
            return "wld/modifyPatient";
    }

    /**
     * 跳转到查询医生信息页
     */
    @RequestMapping("/togetDoctor")
    public String togetDoctor(){
        return "/doctor/docInfo";
    }

    /**
     * 跳转到添加医生信息页
     */
    @RequestMapping("/toAddDoctor")
    public String toaddDoc(){
        return "/doctor/addDoc";
    }

    /**
     * 跳转到添加药品页
     */
    @RequestMapping("/toaddDrug")
    public String toaddDrug(){
        return "wld/addDrug";
    }

    /**
     * 跳转到添加评论页面
     */
    @RequestMapping("/toaddReview")
    public String toAddReview(){
        return "wld/addReview";
    }

    /**
     * 跳转到添加科室页面
     */
    @RequestMapping("/toaddDepartment")
    public String toaddDepartment(){
        return "wld/addDepartment";
    }

    /**
     * 跳转到预约挂号功能页
     */
    @RequestMapping("/todoBooking")
    public String todoBooking(){
        return "wld/order";
    }

    /**
     * 跳转到科室查询页
     */
    @RequestMapping("/togetDepartment")
    public String togetDepartment(){
        return "wld/departmentlist";
    }

    /**
     * 跳转到科室查询页(Two)
     */
    @RequestMapping("/togetDepartmentTwo")
    public String togetDepartmentTwo(){
        return "wld/departmentlistTwo";
    }

    /**
     * 跳转到医院公告查询页(Two)
     */
    @RequestMapping("/togetNotice")
    public String togetNotice(){
        return "wld/getNotice";
    }

    /**
     * 跳转到默认显示页(Two)
     */
    @RequestMapping("/tomargin")
    public String tomargin(){
        return "wld/margin";
    }
    /**
     * 跳转到专家查询页(Two)
     */
    @RequestMapping("/togetDoctorByDepartmentId")
    public String togetDoctorByDepartmentId(int departmentId, Model model){
        model.addAttribute("departmentId",departmentId);
        return "wld/doctorList";
    }


}
